package com.example.cwfdemo.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author Carson
 * @Date 2019/8/13 23:46
 */
@Component
//@ConfigurationProperties(prefix = "email")
public class EmailConfig {
    // 邮件发送协议
    private static String email_protocal;

    // SMTP邮件服务器
    private static String email_host;

    // SMTP邮件服务器默认端口
    private static String email_port;

    // 是否要求身份认证
    private static String is_auth;

    // 是否启用调试模式（启用调试模式可打印客户端与服务器交互过程时一问一答的响应消息）
    private static String is_enabled_debug_mod;

    // 发件人
    private static String email_account;

    // 发件人密码(口令)
    private static String email_password;




    public static String getEmail_protocal() {
        return email_protocal;
    }

    @Value("${email.email_protocal}")
    public void setEmail_protocal(String email_protocal) {
        EmailConfig.email_protocal = email_protocal;
    }

    public static String getEmail_host() {
        return email_host;
    }

    @Value("${email.email_host}")
    public void setEmail_host(String email_host) {
        EmailConfig.email_host = email_host;
    }

    public static String getEmail_port() {
        return email_port;
    }

    @Value("${email.email_port}")
    public void setEmail_port(String email_port) {
        EmailConfig.email_port = email_port;
    }

    public static String getIs_auth() {
        return is_auth;
    }

    @Value("${email.is_auth}")
    public void setIs_auth(String is_auth) {
        EmailConfig.is_auth = is_auth;
    }

    public static String getIs_enabled_debug_mod() {
        return is_enabled_debug_mod;
    }

    @Value("${email.is_enabled_debug_mod}")
    public void setIs_enabled_debug_mod(String is_enabled_debug_mod) {
        EmailConfig.is_enabled_debug_mod = is_enabled_debug_mod;
    }

    public static String getEmail_account() {
        return email_account;
    }

    @Value("${email.email_account}")
    public void setEmail_account(String email_account) {
        EmailConfig.email_account = email_account;
    }

    public static String getEmail_password() {
        return email_password;
    }

    @Value("${email.email_password}")
    public void setEmail_password(String email_password) {
        EmailConfig.email_password = email_password;
    }
}
